package com.yymx.toback.common.enums;

/**
 * mobile返回状态及信息
 * zhangcg on 2018/8/10.
 */
public enum BackResultEnum {
    UNKONW_ERROR("-1", "未知错误"),
    NETWORK_ERROR("-1000","网络错误"),
    SUCCESS("0000", "成功"),
    VALID_ERROR("-2","数据验证错误"),
    OPERATION_FAIL("0001", "操作失败!"),
    OPERATION_DATA_WRONG("0010", "操作参数不能为空!"),


    //异常验证
    USER_NAME_IS_NULL("1000", "用户名不能为空!"),
    USER_PASSWORD_IS_NULL("1001", "密码不能为空!"),
    USER_PASSWORD_IS_WRONG("1002", "密码错误!"),
    USER_STATUS_OFF("1003", "用户已锁定!"),
    USER_LOGIN_WRONG("1004", "用户登录数据异常!"),
    USER_OLD_PASSWORD_IS_NULL("1005", "原密码不能为空"),
    USER_NEW_PASSWORD_IS_NULL("1006", "新密码不能为空"),
    USER_OLD_NEW_PASSWORD_WRONG("1007", "新旧密码不一致"),
    USER_OLD_PASSWORD_WRONG("1008", "旧密码错误"),
    USER_TELEPHONE_IS_NULL("1009", "手机号不能为空!"),
    USER_CONFIRM_PASSWORD_WRONG("1010", "确定密码不一致"),
    USER_REALNAME_IS_NULL("1011", "真实姓名不能为空!"),

    USER_IS_NULL("1020", "用户不存在!"),
    USER_DATA_WRONG("1021", "用户数据有误!"),
    RESOURCES_DATA_WRONG("1022", "资源数据有误!"),
    MENU_DATA_WRONG("1023", "获取系统菜单失败!"),
    USER_VIEW_OPER_WRONG("1024", "操作参数不能为空!"),
    USER_SAVE_WRONG("1025", "保存数据异常!"),
    USER_USERNAME_IS_EXIST("1026", "用户名已存在!"),
    USER_ROLE_ID_NOT_EXIST("1027", "角色id不存在!"),
    USER_UNAUTH_NOT("1028", "用户无此权限!"),


    ERROR_MENU_WRONG("9001", "获取系统菜单异常!"),
    ERROR_UPDATE_PWD_WRONG("9002", "修改密码异常!"),
    ERROR_USER_VIEW_WRONG("9003", "查看用户异常!"),
    ERROR_USER_SAVE_WRONG("9004", "保存数据异常!"),
    ERROR_USER_UPDATE_WRONG("9005", "更新数据异常!"),
    ERROR_USER_DEL_WRONG("9006", "删除数据异常!"),
    ERROR_USER_TOKEN_WRONG("9007", "token错误!"),
    ERROR_CASH_EXPORT_WRONG("9008", "提现导出异常!"),
    ERROR_RECHARGE_EXPORT_WRONG("9009", "充值导出异常!"),


    RESOURCE_DATA_IS_WRONG("2000","资源基础信息有误！"),
    RESOURCE_NAME_IS_NULL("2001","资源名称不能为空！"),
    RESOURCE_CODE_IS_NULL("2002","菜单编码不能为空！"),
    RESOURCE_RESOURCELEVEL_IS_NULL("2007","资源等级不能为空！"),
    RESOURCE_CODE_IS_EXIST("2003","菜单编码已存在！"),
    RESOURCE_SEQUENCE_WRONG("2004","菜单顺序输入有误！"),
    RESOURCE_MENU_TYPE_IS_NULL("2005","资源类型不能为空！"),
    ERROR_RESOURCE_SAVE_WRONG("2006", "权限资源操作失败!"),
    RESOURCE_URL_IS_NULL("2007", "资源路径不能为空!"),






    PARAMETER_KEY_IS_NULL("3005","参数记录主键为空!"),
    PARAMETER_NAME_IS_NULL("3001","参数名称不能为空!"),
    PARAMETER_CODE_IS_NULL("3002","参数编码不能为空!"),
    PARAMETER_CODE_IS_EXIST("3003","参数编码已存在!"),
    PARAMETER_CODE_TYPE_NULL("3004","参数类型不能为空!"),

    PARAMETER_OPERATION_WRONG("3000","参数操作失败!")


    ;

    private String code;

    private String msg;

    BackResultEnum() {
    }

    BackResultEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
